import paddlehub as hub

module = hub.Module(name="ernie_gen")

result = module.finetune(
    train_path='train.txt',
    dev_path='dev.txt',
    max_steps=300,
    batch_size=2
)

module.export(params_path=result['last_save_path'], module_name="ernie_gen_test", author="test")